<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OpenIG: OpenIG::Base::Configuration Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="openig_logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OpenIG
   &#160;<span id="projectnumber">2.0.7</span>
   </div>
   <div id="projectbrief">cross-platform open-source OpenSceneGraph Image Generator</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>OpenIG</b></li><li class="navelem"><b>Base</b></li><li class="navelem"><a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html">Configuration</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_open_i_g_1_1_base_1_1_configuration-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">OpenIG::Base::Configuration Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html" title="The Configuration class. ">Configuration</a> class.  
 <a href="class_open_i_g_1_1_base_1_1_configuration.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_configuration_8h_source.html">Configuration.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a40d5dec135d34d173035a298694d57fd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html#a40d5dec135d34d173035a298694d57fd">readFromXML</a> (const std::string &amp;fileName, const std::string &amp;section)</td></tr>
<tr class="memdesc:a40d5dec135d34d173035a298694d57fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads an XML file section and fills in the values in a token based std::map.  <a href="#a40d5dec135d34d173035a298694d57fd">More...</a><br /></td></tr>
<tr class="separator:a40d5dec135d34d173035a298694d57fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1aaa4b6b3afa1b1a460a4c5e3bb3702"><td class="memItemLeft" align="right" valign="top">const std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html#ab1aaa4b6b3afa1b1a460a4c5e3bb3702">getConfig</a> (const std::string &amp;token, const std::string=&quot;&quot;)</td></tr>
<tr class="memdesc:ab1aaa4b6b3afa1b1a460a4c5e3bb3702"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets a value based on a given token and provides a default value if the token is not present  <a href="#ab1aaa4b6b3afa1b1a460a4c5e3bb3702">More...</a><br /></td></tr>
<tr class="separator:ab1aaa4b6b3afa1b1a460a4c5e3bb3702"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2209087e13c4aae709069f4544240f82"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html#a2209087e13c4aae709069f4544240f82">getConfig</a> (const std::string &amp;token, double value=0.0)</td></tr>
<tr class="memdesc:a2209087e13c4aae709069f4544240f82"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets a value based on a given token and provides a default value if the token is not present  <a href="#a2209087e13c4aae709069f4544240f82">More...</a><br /></td></tr>
<tr class="separator:a2209087e13c4aae709069f4544240f82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2e66200b70306986e1e36499908971b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html#af2e66200b70306986e1e36499908971b">getConfig</a> (const std::string &amp;token, int value=0)</td></tr>
<tr class="memdesc:af2e66200b70306986e1e36499908971b"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets a value based on a given token and provides a default value if the token is not present  <a href="#af2e66200b70306986e1e36499908971b">More...</a><br /></td></tr>
<tr class="separator:af2e66200b70306986e1e36499908971b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a5ad24d2e501900da9275c2b717c32392"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html">Configuration</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html#a5ad24d2e501900da9275c2b717c32392">instance</a> ()</td></tr>
<tr class="memdesc:a5ad24d2e501900da9275c2b717c32392"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html" title="The Configuration class. ">Configuration</a> singleton.  <a href="#a5ad24d2e501900da9275c2b717c32392">More...</a><br /></td></tr>
<tr class="separator:a5ad24d2e501900da9275c2b717c32392"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:aa55dcdbad177ba2572bf1b1f58921c49"><td class="memItemLeft" align="right" valign="top"><a id="aa55dcdbad177ba2572bf1b1f58921c49"></a>
typedef std::map&lt; std::string, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConfigMap</b></td></tr>
<tr class="separator:aa55dcdbad177ba2572bf1b1f58921c49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06811df6cee8b8c6d0fd5af0e0ebaae1"><td class="memItemLeft" align="right" valign="top"><a id="a06811df6cee8b8c6d0fd5af0e0ebaae1"></a>
typedef std::map&lt; std::string, std::string &gt;::iterator&#160;</td><td class="memItemRight" valign="bottom"><b>ConfigMapIterator</b></td></tr>
<tr class="separator:a06811df6cee8b8c6d0fd5af0e0ebaae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a137a1d67c4d7e5c2841ff5642df20edf"><td class="memItemLeft" align="right" valign="top"><a id="a137a1d67c4d7e5c2841ff5642df20edf"></a>
typedef std::map&lt; std::string, std::string &gt;::const_iterator&#160;</td><td class="memItemRight" valign="bottom"><b>ConfigMapConstIterator</b></td></tr>
<tr class="separator:a137a1d67c4d7e5c2841ff5642df20edf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a6423e4718a3c4840d88de0b144d5a5bb"><td class="memItemLeft" align="right" valign="top"><a id="a6423e4718a3c4840d88de0b144d5a5bb"></a>
ConfigMap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html#a6423e4718a3c4840d88de0b144d5a5bb">_configuration</a></td></tr>
<tr class="memdesc:a6423e4718a3c4840d88de0b144d5a5bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">token based std::map of tag values <br /></td></tr>
<tr class="separator:a6423e4718a3c4840d88de0b144d5a5bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html" title="The Configuration class. ">Configuration</a> class. </p>
<p>Handy singleton to get access to values from an XML file </p><dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ab1aaa4b6b3afa1b1a460a4c5e3bb3702"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1aaa4b6b3afa1b1a460a4c5e3bb3702">&#9670;&nbsp;</a></span>getConfig() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string OpenIG::Base::Configuration::getConfig </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>token</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string&#160;</td>
          <td class="paramname"> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>gets a value based on a given token and provides a default value if the token is not present </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">token</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the value </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="a2209087e13c4aae709069f4544240f82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2209087e13c4aae709069f4544240f82">&#9670;&nbsp;</a></span>getConfig() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double OpenIG::Base::Configuration::getConfig </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>token</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em> = <code>0.0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>gets a value based on a given token and provides a default value if the token is not present </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">token</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the value </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="af2e66200b70306986e1e36499908971b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2e66200b70306986e1e36499908971b">&#9670;&nbsp;</a></span>getConfig() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int OpenIG::Base::Configuration::getConfig </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>token</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>gets a value based on a given token and provides a default value if the token is not present </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">token</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the value </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="a5ad24d2e501900da9275c2b717c32392"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ad24d2e501900da9275c2b717c32392">&#9670;&nbsp;</a></span>instance()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html">Configuration</a>* OpenIG::Base::Configuration::instance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The <a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html" title="The Configuration class. ">Configuration</a> singleton. </p>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="class_open_i_g_1_1_base_1_1_configuration.html" title="The Configuration class. ">Configuration</a> singleton </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="a40d5dec135d34d173035a298694d57fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40d5dec135d34d173035a298694d57fd">&#9670;&nbsp;</a></span>readFromXML()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool OpenIG::Base::Configuration::readFromXML </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>section</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads an XML file section and fills in the values in a token based std::map. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">The</td><td>file name of the XML </td></tr>
    <tr><td class="paramname">The</td><td>section name from the XML </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false on failure </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Core-Base/<a class="el" href="_configuration_8h_source.html">Configuration.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed May 16 2018 15:41:11 for OpenIG by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
